<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>诗词入库</title>
</head>
<body>
<f:view>
	<h:form>
		<table>
			<tr>
				<td colspan="2"><h2>诗词入库</h2></td>
			</tr>
			<tr>
				<td>标题</td>
				<td><h:inputText value="#{poemMB.newPoem.title }"></h:inputText></td>
			</tr>
			<tr>
				<td>作者</td>
				<td><h:inputText value="#{poemMB.newPoem.author }"></h:inputText></td>
			</tr>
			<tr>
				<td>年代</td>
				<td><h:selectOneMenu value="#{poemMB.newPoem.age }">
					<f:selectItem itemValue="1" itemLabel="唐代"/>
					<f:selectItem itemValue="2" itemLabel="宋代"/>
					<f:selectItem itemValue="3" itemLabel="南宋"/>
					<f:selectItem itemValue="4" itemLabel="北代"/>
					<f:selectItem itemValue="5" itemLabel="未知"/>
				</h:selectOneMenu></td>
			</tr>
			<tr>
				<td>题材</td>
				<td><h:selectOneMenu value="#{poemMB.newPoem.topic }">
					<f:selectItem itemValue="1" itemLabel="春"/>
					<f:selectItem itemValue="2" itemLabel="夏"/>
					<f:selectItem itemValue="3" itemLabel="秋"/>
					<f:selectItem itemValue="4" itemLabel="冬"/>
					<f:selectItem itemValue="5" itemLabel="桥"/>
					<f:selectItem itemValue="6" itemLabel="雪"/>
					<f:selectItem itemValue="7" itemLabel="花"/>
					<f:selectItem itemValue="8" itemLabel="鸟"/>
					<f:selectItem itemValue="9" itemLabel="山"/>
					<f:selectItem itemValue="10" itemLabel="月亮"/>
					<f:selectItem itemValue="11" itemLabel="梅花"/>
					<f:selectItem itemValue="12" itemLabel="其它"/>
				</h:selectOneMenu></td>
			</tr>
			<tr>
				<td>诗歌类型</td>
				<td><h:selectOneMenu value="#{poemMB.newPoem.type }">
					<f:selectItem itemValue="1" itemLabel="五律"/>
					<f:selectItem itemValue="2" itemLabel="五绝"/>
					<f:selectItem itemValue="3" itemLabel="五古"/>
					<f:selectItem itemValue="4" itemLabel="五排"/>
					<f:selectItem itemValue="5" itemLabel="七律"/>
					<f:selectItem itemValue="6" itemLabel="七绝"/>
					<f:selectItem itemValue="7" itemLabel="七古"/>
					<f:selectItem itemValue="8" itemLabel="七排"/>
					<f:selectItem itemValue="9" itemLabel="未知"/>
				</h:selectOneMenu></td>
			</tr>
			
			<tr>
				<td>诗歌内容</td>
				<td>
					<h:inputTextarea value="#{poemMB.newPoem.content }" cols="20" rows="10"></h:inputTextarea>
				</td>
			</tr>
			<tr>
				<td><h:commandButton type="submit" action="#{poemMB.addPoem }" value="提交"></h:commandButton></td>
				<td><h:commandButton type="reset" value="重置"></h:commandButton>
			</tr>
		</table>
	</h:form>
</f:view>
</body>
</html>